<?php include '../../entries/restful.php';

/**
 *  获取批次列表
 */
class Surface extends Restful{

    public function action(){
        $user = json_decode($this->session->getItem('user'),true);
        $cmt_id = $user['cmt_id'];
        $fee_type = get('fee_type');

        $sql = 'select id,name from fee_batch where cmt_id = ? and fee_type = ? order by id desc ';
        $arg = [$cmt_id,$fee_type];

        $info = Mdb::query(MDB_MAIN,$sql,$arg);

        return Res::ok($info);
    }
}

new Surface();